<?php

namespace Database\Factories;

use App\Models\Membercard;
use Illuminate\Database\Eloquent\Factories\Factory;

class MemberCardFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Membercard::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'card_batch_id' => $this->faker->numberBetween(1, 99999),
            'user_id' => 1,
            'use_time' => date('Y-m-d H:i:s', time()),
            'card_number' => $this->faker->numberBetween(100000000, 999999999),
            'card_password' => bcrypt(123),
            'status' => $this->faker->randomElement([0, 1]),
            'phone' => $this->faker->phoneNumber,
            'reci_name' => $this->faker->name
        ];
    }
}


